def predict_probs(self):
    # print("推理时修改分类分数")
    """
    Returns:
        list[Tensor]: A list of Tensors of predicted class probabilities for each image.
            Element i has shape (Ri, K + 1), where Ri is the number of predicted objects
            for image i.
    """
    # 以下是我修改的部分--------------------------------------------------------
    # 得到分组,对原始分类分数进行修改
    group_pred = torch.argmax(self.bin_class_logits, dim=1)
    cls_pred = torch.argmax(self.pred_class_logits, dim=1)

    # print("group_pred: ", group_pred)
    # 背景太多，全分类为背景类了，只要一部分背景，保证类别均衡

    # 得到组0的索引
    index_0 = (group_pred == 0) & (cls_pred < 20)
    # print("num bg: ", torch.nonzero(cls_pred == 20).size()[0])
    # print("num_index_0: ", torch.nonzero(index_0).size()[0])
    # 得到组1的索引
    index_1 = (group_pred == 1) & (cls_pred < 20)
    # print("num index_1: ", torch.nonzero(index_1).size()[0])
    # min_data = torch.min(self.pred_class_logits)
    # print("min_data: ", min_data.item())
    # min_data:  -10.256054878234863

    probs = F.softmax(self.pred_class_logits, dim=-1)

    # 对softmax后的值修改
    for class_i in self.group[1]:
        # 负组的概率降低，同时将正组的概率增加，保证和为1
        # 0组的1类分数减小，1组的1类分数增加
        probs[index_0, class_i] -= self.alpha
        probs[index_1, class_i] += self.alpha
    # 将类1特征的类0分数减小
    for class_i in self.group[0]:
        # 1组的0类分数减小，0组的0类分数增加
        probs[index_1, class_i] -= self.alpha
        probs[index_0, class_i] += self.alpha
    # 修改部分--------------------------------------------------------

    return probs.split(self.num_preds_per_image, dim=0)